package day06;

import java.util.Scanner;

public class Typetax {
    public static void main(String[] args) {
        try (// TODO 自动生成的方法存根
		Scanner sc = new Scanner(System.in)) {
			double cash = sc.nextDouble();
			double money = sc.nextDouble();
			double s = cash - money;

			double total = 0;
			if (s > 80000) {
			    total += (s - 80000) * 0.45;
			    total += 25000 * 0.35;
			    total += 20000 * 0.3;
			    total += 26000 * 0.25;
			    total += 4500 * 0.2;
			    total += 3000 * 0.1;
			    total += 1500 * 0.03;
			} else if (s > 55000 && s <= 80000) {
			    total += (s - 55000) * 0.35;
			    total += 20000 * 0.3;
			    total += 26000 * 0.25;
			    total += 4500 * 0.2;
			    total += 3000 * 0.1;
			    total += 1500 * 0.03;
			} else if (s > 35000 && s <= 55000) {
			    total += (s - 35000) * 0.3;
			    total += 26000 * 0.25;
			    total += 4500 * 0.2;
			    total += 3000 * 0.1;
			    total += 1500 * 0.03;
			} else if (s > 9000 && s <= 35000) {
			    total += (s - 9000) * 0.25;
			    total += 4500 * 0.2;
			    total += 3000 * 0.1;
			    total += 1500 * 0.03;
			} else if (s > 4500 && s <= 9000) {
			    total += (s - 4500) * 0.2;
			    total += 3000 * 0.1;
			    total += 1500 * 0.03;
			} else if (s > 1500 && s <= 4500) {
			    total += (s - 1500) * 0.1;
			    total += 1500 * 0.03;
			} else {
			    total += s * 0.03;
			}
			
			if(s<0) {
			    System.out.println("0.00");
			}
			else {
			    System.out.printf("%.2f\n", total);
			}
		}
    }
}
